//
//  CustomCollectionViewCell.m
//  怎么说呢
//
//  Created by 杜远洋 on 15-1-3.
//  Copyright (c) 2015年 蓝欧科技. All rights reserved.
//

#import "CustomCollectionViewCell.h"

@implementation CustomCollectionViewCell
- (void)dealloc
{
    [_myField release];
    [_myImage release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {

        [self.contentView setBackgroundColor:[UIColor clearColor]];
        //图片后面的背景
        self.locationView = [[UILabel alloc] initWithFrame:CGRectMake(self.frame.size.width / 18, 0, self.frame.size.width / 9 * 8, self.frame.size.width / 9 * 8)];

      
        self.locationView.layer.cornerRadius = 10;
        self.locationView.layer.masksToBounds = YES;
        [self.contentView addSubview:_locationView];
        
        //图片
        self.myImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width / 3 * 2, self.frame.size.width / 3 * 2)];
        self.myImage.center = CGPointMake(_locationView.frame.size.width / 2, _locationView.frame.size.height / 2);
        [self.myImage setBackgroundColor:[UIColor clearColor]];
        self.myImage.layer.cornerRadius = 5;
        self.myImage.layer.masksToBounds = YES;
        [_locationView addSubview:self.myImage];
        [_myImage release];
        
        
        //车名字
        self.myField = [[UILabel alloc] initWithFrame:CGRectMake(0, _locationView.frame.size.height, self.frame.size.width, self.frame.size.height/3)];
        [self.myField setBackgroundColor:[UIColor clearColor]];
        [self.myField setTextAlignment:NSTextAlignmentCenter];
        [self.myField setFont:[UIFont systemFontOfSize:14]];
        [self.contentView addSubview:self.myField];
        [_myField release];
        [_locationView release];
        
        
            }
    return self;
}



@end
